package com.gongj.annon;


import com.gongj.aop.User;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

public class AppMain {

	public static void main(String[] args) {
//		AnnotationConfigApplicationContext context =
//				new AnnotationConfigApplicationContext(AppApplication.class);
		AnnotationConfigApplicationContext context2 =
				new AnnotationConfigApplicationContext();
		context2.register(AppApplication.class);

		//context2.addBeanFactoryPostProcessor(new MyBeanDefinitionRegistryPostProcessor());
		context2.refresh();

//		UserService userService = context.getBean(UserService.class);
//		System.out.println(userService);
//		UserService userService2 = context.getBean(UserService.class);
//		System.out.println(userService2);

//		Test2 test1 = context2.getBean(Test2.class);
//		System.out.println(test1 + " ===" +test1.hashCode());
//		Test2 test2 = context2.getBean(Test2.class);
//		System.out.println(test2 + " ===" + test2.hashCode());
		//userService.test();
	}

}
